/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PlantGrowthMachine {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010090031';
    }

    get categoryName() {
        return '\u690d\u7269\u751f\u957f\u673a';
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'p1vZLijP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentHumidity(params) {
        return command({
            method: 'getCurrentHumidity',
            methodId: 'ptRSgkJA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'phEcQqsC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'pgh0Ub6U',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPumpSwitch(params) {
        return command({
            method: 'getPumpSwitch',
            methodId: 'pGox3ykm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pDrhrxaw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'ppAr4fCK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'pZgubjI5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setPumpSwitch(params) {
        return command({
            method: 'setPumpSwitch',
            methodId: 'peH3eFSM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pUPQDOll',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PlantGrowthMachine;
